﻿using System;
using System.Data;
using System.ComponentModel.DataAnnotations;
using TidyBlog.Data.Mapping;

namespace TidyBlog.Entity
{
    /// <summary>
    /// 链接实体类
    /// </summary>
    [Table(Name = "TidyBlog_Link", IsIgnoreRead = true)]
    public class Link
    {
        /// <summary>
        /// 链接编号
        /// </summary>
        [Column(IsPrimaryKey = true, IsDbGenerated = true)]
        public int LinkId { get; set; }
        /// <summary>
        /// 站点名
        /// </summary>
        [Column(DataType = DbType.String, Length = 20), DisplayFormat(ConvertEmptyStringToNull = false)]
        public string LinkName { get; set; }
        /// <summary>
        /// 链接地址
        /// </summary>
        [Column(DataType = DbType.String, Length = 50), DisplayFormat(ConvertEmptyStringToNull = false)]
        public string LinkUrl { get; set; }
        /// <summary>
        /// 链接说明
        /// </summary>
        [Column(DataType = DbType.String, Length = 30), DisplayFormat(ConvertEmptyStringToNull = false)]
        public string Description { get; set; }
        /// <summary>
        /// 权重
        /// </summary>
        [Column(OrderBy = 1, OrderWay = 1)]
        public byte Weight { get; set; }
    }
}